using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class cullingMask2 : MonoBehaviour
{
    public Camera m_Camera;
    // Start is called before the first frame update
    void Start()
    {

    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void OnTriggerEnter2D(Collider2D collision)
    {
        if(collision is CapsuleCollider2D && collision.CompareTag("Player"))
        {
            m_Camera.cullingMask = ~(1<<LayerMask.NameToLayer("hiddenground"));
        }
    }

}
